using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Entity_SFX : MonoBehaviour
{
    [SerializeField] private string attackHitName;
    [SerializeField] private string attackMissName;
    [SerializeField] private float minDistanceToHear = 15f;
    private AudioSource audioSource;


    private void Awake()
    {
        audioSource = GetComponentInChildren<AudioSource>();
    }

    public void PlayAttackHit()
    {
        AudioManager.Instance.PlaySFX(attackHitName, audioSource, minDistanceToHear);
    }

    public void PlayAttackMiss()
    {
        AudioManager.Instance.PlaySFX(attackMissName, audioSource, minDistanceToHear);
    }
}
